/*
 * 
 * 
 */
package anttesttools.classforname;

import java.io.File;
import java.util.Map;
import org.ho.yaml.Yaml;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author anttesttools
 */
public class Test
{

    private static Logger log = LoggerFactory.getLogger(Test.class);

    public static void main(String[] args)
    {
        try
        {
            Map ymlMap = (Map) Yaml.load(new File("F:\\My Documents\\NetBeansProjects\\anttesttools\\src\\anttesttools/classforname/Test.yml"));
            String className = ymlMap.get(args[0]).toString();
            log.debug(className);
            Action action = (Action) Class.forName(className).newInstance();
            action.init(args);
            action.run();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }

    }
}
